package com.qianbei.user;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by user on 16/5/17.
 */
public class QianBeiUserInfoModel{



    /**
     * identity : 高级前端工程师
     * face : /system/users/faces/20151027/101612/medium/101612.png?1456825718
     * name : 李鑫
     * career : 本科的专业为英语，从事英语教育长达14年，其中5年在美国，9年在中国。在中国的九年期间去过锦州、太原等多个城市，非常熟悉中国人学英语的习惯，有专门针对中国提升口语的教学方案，了解各类学生的特点，能够根据学生本身量身定做口语对话。
     * pictures : [{"id":"126664","url":"/system/pictures/pictures/20160505/126664/original/126664.jpg?1462452109#original_dimensions=200x200"}]
     * work_company : 新东方
     * user_id : 101612
     * seniority : true
     * city : 北京市
     * country : 中国
     */

    private UserInfoBean user_info;  //用户信息
    /**
     * career : 本科的专业为英语，从事英语教育长达14年，其中5年在美国，9年在中国。在中国的九年期间去过锦州、太原等多个城市，非常熟悉中国人学英语的习惯，有专门针对中国提升口语的教学方案，了解各类学生的特点，能够根据学生本身量身定做口语对话。
     * pictures : []
     * identity : 高级前端工程师
     * face : /system/seniority_info_checks/faces/20160308/100616/small/100616.png?1457449304
     * city : 北京市
     * country : 中国
     * name : 李鑫
     */

    private LastCheckInfoBean last_check_info; //用户审核信息
    /**
     * user_info : {"identity":"高级前端工程师","face":"/system/users/faces/20151027/101612/medium/101612.png?1456825718","name":"李鑫","career":"本科的专业为英语，从事英语教育长达14年，其中5年在美国，9年在中国。在中国的九年期间去过锦州、太原等多个城市，非常熟悉中国人学英语的习惯，有专门针对中国提升口语的教学方案，了解各类学生的特点，能够根据学生本身量身定做口语对话。","pictures":[{"id":"126664","url":"/system/pictures/pictures/20160505/126664/original/126664.jpg?1462452109#original_dimensions=200x200"}],"work_company":"新东方","user_id":"101612","seniority":true,"city":"北京市","country":"中国"}
     * last_check_info : {"career":"本科的专业为英语，从事英语教育长达14年，其中5年在美国，9年在中国。在中国的九年期间去过锦州、太原等多个城市，非常熟悉中国人学英语的习惯，有专门针对中国提升口语的教学方案，了解各类学生的特点，能够根据学生本身量身定做口语对话。","pictures":[],"identity":"高级前端工程师","face":"/system/seniority_info_checks/faces/20160308/100616/small/100616.png?1457449304","city":"北京市","country":"中国","name":"李鑫"}
     * status : true
     * can_update_info : false
     */

    private boolean status;
    private boolean can_update_info;  //前辈能否更新资料

    public UserInfoBean getUser_info() {
        return user_info;
    }

    public void setUser_info(UserInfoBean user_info) {
        this.user_info = user_info;
    }

    public LastCheckInfoBean getLast_check_info() {
        return last_check_info;
    }

    public void setLast_check_info(LastCheckInfoBean last_check_info) {
        this.last_check_info = last_check_info;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public boolean isCan_update_info() {
        return can_update_info;
    }

    public void setCan_update_info(boolean can_update_info) {
        this.can_update_info = can_update_info;
    }

    public static class UserInfoBean implements Parcelable{
        private String identity;
        private String face;
        private String name;
        private String career;
        private String work_company;
        private String user_id;
        private boolean seniority;
        private String city;
        private String country;
        /**
         * id : 126664
         * url : /system/pictures/pictures/20160505/126664/original/126664.jpg?1462452109#original_dimensions=200x200
         */

        private List<PicturesBean> pictures;

        private List<String> mPicturesList;

        public UserInfoBean() {
        }


        protected UserInfoBean(Parcel in) {

            identity = in.readString();
            face = in.readString();
            name = in.readString();
            career = in.readString();
            work_company = in.readString();
            user_id = in.readString();
            seniority = in.readByte() != 0;
            city = in.readString();
            country = in.readString();
            pictures = in.createTypedArrayList(PicturesBean.CREATOR);
            mPicturesList = in.createStringArrayList();
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(identity);
            dest.writeString(face);
            dest.writeString(name);
            dest.writeString(career);
            dest.writeString(work_company);
            dest.writeString(user_id);
            dest.writeByte((byte) (seniority ? 1 : 0));
            dest.writeString(city);
            dest.writeString(country);
            dest.writeTypedList(pictures);
            dest.writeStringList(mPicturesList);
        }

        @Override
        public int describeContents() {
            return 0;
        }

        public static final Creator<UserInfoBean> CREATOR = new Creator<UserInfoBean>() {
            @Override
            public UserInfoBean createFromParcel(Parcel in) {
                return new UserInfoBean(in);
            }

            @Override
            public UserInfoBean[] newArray(int size) {
                return new UserInfoBean[size];
            }
        };

        public String getIdentity() {
            return identity;
        }

        public void setIdentity(String identity) {
            this.identity = identity;
        }

        public String getFace() {
            return face;
        }

        public void setFace(String face) {
            this.face = face;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getCareer() {
            return career;
        }

        public void setCareer(String career) {
            this.career = career;
        }

        public String getWork_company() {
            return work_company;
        }

        public void setWork_company(String work_company) {
            this.work_company = work_company;
        }

        public String getUser_id() {
            return user_id;
        }

        public void setUser_id(String user_id) {
            this.user_id = user_id;
        }

        public boolean isSeniority() {
            return seniority;
        }

        public void setSeniority(boolean seniority) {
            this.seniority = seniority;
        }

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getCountry() {
            return country;
        }

        public void setCountry(String country) {
            this.country = country;
        }

        public List<PicturesBean> getPictures() {
            return pictures;
        }

        public List<String> getPicturesList() {
            return mPicturesList;
        }

        public void setPicturesList(List<String> mPicturesList) {
            this.mPicturesList = mPicturesList;
        }

        public void setPictures(List<PicturesBean> pictures) {
            this.pictures = pictures;
        }


        public static class PicturesBean implements Parcelable {
            private String id;
            private String url;

            public PicturesBean() {
            }

            protected PicturesBean(Parcel in) {
                id = in.readString();
                url = in.readString();
            }

            public static final Creator<PicturesBean> CREATOR = new Creator<PicturesBean>() {
                @Override
                public PicturesBean createFromParcel(Parcel in) {
                    return new PicturesBean(in);
                }

                @Override
                public PicturesBean[] newArray(int size) {
                    return new PicturesBean[size];
                }
            };

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(id);
                dest.writeString(url);
            }
        }
    }

    public static class LastCheckInfoBean{
        private String career;
        private String identity;
        private String face;
        private String city;
        private String country;
        private String name;
        private List<UserInfoBean.PicturesBean> pictures;

        public String getCareer() {
            return career;
        }

        public void setCareer(String career) {
            this.career = career;
        }

        public String getIdentity() {
            return identity;
        }

        public void setIdentity(String identity) {
            this.identity = identity;
        }

        public String getFace() {
            return face;
        }

        public void setFace(String face) {
            this.face = face;
        }

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getCountry() {
            return country;
        }

        public void setCountry(String country) {
            this.country = country;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<UserInfoBean.PicturesBean> getPictures() {
            return pictures;
        }

        public void setPictures(List<UserInfoBean.PicturesBean> pictures) {
            this.pictures = pictures;
        }
    }
}
